/*************************************************************************************
 * Description  :
 * Version      : 1.0
 * Author       : simon.yuan
 * Date         : 2021-12-19 15:31:09
 * LastEditors  : simon.yuan
 * LastEditTime : 2021-12-19 16:58:33
 * FilePath     : \\singlelinklist\\main.c
 * Copyright (C) 2021 QinJin Electronics. All rights reserved.
 *************************************************************************************/
#include <stdio.h>
#include "single_linklist.h"

sList_t sList;

int main(void)
{
    unsigned int insert_data = 20;

    sList_Init(&sList);
    sList_InsertTail(&sList, &insert_data);

    insert_data = 15;
    sList_InsertTail(&sList, &insert_data);

    insert_data = 25;
    sList_InsertHead(&sList, &insert_data);

    sList_ShowList(&sList);

    sList_SortAscending(&sList);
    sList_ShowList(&sList);

    /* Remove node by data */
    sList_RemoveNodeByData(&sList, 15);
    printf("RemovedNodeByData: \r\n");
	sList_ShowList(&sList);
	
    return 0;
}